home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
develop
/
libsrc11.arc
/
WRBYTSPI.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-04-27
|
671b
|
34 lines
/* wrbytspi.c 4.3 */
/*F****************************************************************************
FUNCTION NAME: wrbytspi
ACTION: Writes a byte to the SPI port.
PARAMETERS:
byte_value: value to be written to SPI port
RETURNS: (void)
******************************************************************************/
#include <hc11/io.h>
#include <hc11/spi.h>
#include <hc11/directives.h>
SMALL
void wrbytspi(byte_value)
int byte_value;
{
HC11.SPCR |= SPE;
HC11.SPSRDAT.DATAREG = byte_value;
while ((HC11.SPSRDAT.STATUS & SPIF) == 0) /* wait for byte to be output */
; /* null statement */
} /* end of wrbytspi */